
package jpoco.client;

public class InstantMessagingAddress
	implements java.io.Serializable
{
	public static final String TYPE_AOL_IM= "aim";
	public static final String TYPE_GOOGLE_TALK = "gtalk";
	public static final String TYPE_ICQ = "icq";
	public static final String TYPE_XMPP = "xmpp";
	public static final String TYPE_MSN = "msn";
	public static final String TYPE_SKYPE = "skype";
	public static final String TYPE_QQ = "qq";
	public static final String TYPE_YAHOO = "yahoo";
	
	private String value;
	private String type;
	private boolean primary = false;
	
	public InstantMessagingAddress()
	{
		super();
	}

	public String getValue()
	{
		return value;
	}

	public void setValue(String v)
	{
		this.value = v;
	}

	public String getType()
	{
		return type;
	}

	public void setType(String t)
	{
		this.type = t;
	}
	
	/**
	 * 
	 *   AOL instant messenger (AIM)
	 *   
	 */
	public boolean isAIM()
	{
		return TYPE_AOL_IM.equals(this.getType());
	}
	
	public boolean isGoogleTalk()
	{
		return TYPE_GOOGLE_TALK.equals(this.getType());
	}
	
	public boolean isSkype()
	{
		return TYPE_SKYPE.equals(this.getType());
	}
	
	public boolean isXMPP()
	{
		return TYPE_XMPP.equals(this.getType());
	}
	
	public boolean isQQ()
	{
		return TYPE_QQ.equals(this.getType());
	}
	
	public boolean isICQ()
	{
		return TYPE_ICQ.equals(this.getType());
	}

	public boolean isYahoo()
	{
		return TYPE_YAHOO.equals(this.getType());
	}

	public boolean isMSN()
	{
		return TYPE_MSN.equals(this.getType());
	}

	public boolean isPrimary()
	{
		return primary;
	}

	public void setPrimary(boolean b)
	{
		this.primary = b;
	}
	
	public String toString()
	{
		return String.valueOf(this.getValue());
	}
}
